﻿using SangaiTech.Abstractions;
using SangaiTech.Core.DomainServices;
using SangaiTech.Infrastructure;
using SimpleInjector;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace SangaiTech.Bootstrap
{
    public class Bootstrapper
    {
        public static Container Container { get; private set; }

        public static void Register()
        {
            Container = new Container();
            SangaiTech.Infrastructure.Bootstrapper.Register(Container);
            SangaiTech.Core.Bootstrapper.Register(Container);

            Container.Verify();
        }

        public static IDependencyResolver GetDependencyResolver()
        {
            return new SimpleInjector.Integration.Web.Mvc.SimpleInjectorDependencyResolver(Container);
        }
    }
}
